Skip to content

[재작업] #52 call-apply-decorator #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

singularity-code
Copy link
Contributor

원문 변경후 다시 작업한것입니다.
리뷰 부탁드립니다.

@Violet-Bora-Lee
Copy link
Member

  • 번역 관련 커밋을 하나로 합쳐주세요.
  • 커밋메시지를 유의미하게 작성해주세요(이슈 번호는 부차적인 정보입니다)

@Violet-Bora-Lee
Copy link
Member

Violet-Bora-Lee commented Oct 13, 2019

Comment on lines -373 to -389
The trick is called *method borrowing*.

We take (borrow) a join method from a regular array `[].join`. And use `[].join.call` to run it in the context of `arguments`.

Why does it work?

That's because the internal algorithm of the native method `arr.join(glue)` is very simple.

Taken from the specification almost "as-is":
위와 같은 방법을 *메서드 빌리기(method borrowing)* 라고 합니다.

1. Let `glue` be the first argument or, if no arguments, then a comma `","`.
2. Let `result` be an empty string.
3. Append `this[0]` to `result`.
4. Append `glue` and `this[1]`.
5. Append `glue` and `this[2]`.
6. ...Do so until `this.length` items are glued.
7. Return `result`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

번역이 누락되어있습니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원문 변경으로 인한 번역 누락 확인 후 작업 부탁드립니다.

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@singularity-code
Copy link
Contributor Author

일단 닫고 하나씩 해보겠습니다

@singularity-code singularity-code deleted the #52_decorator_rework branch October 25, 2019 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants